package packaging.homework1;

public class Account {
    private double balance;

    public Account(double balance) {
        this.balance = balance;
    }

    public double getBalance() {
        return balance;
    }
    public double deposit(double balance){
        System.out.println("存储成功！");
        return this.balance+=balance;
    }
    public double withdraw(double balance){
        boolean full=false;
        if (balance>this.balance){
            System.out.println("账户余额不足！");
        }else{
            System.out.println("取款成功！");
            return this.balance-=balance;
        }
        return this.balance;
    }

}
